package com.crm.service.impl;

import cn.hutool.core.util.ObjectUtil;
import com.crm.dto.TransferPageDTO;
import com.crm.mapper.ClueMapper;
import com.crm.mapper.TransferMapper;
import com.crm.pojo.Clue;
import com.crm.result.PageResult;
import com.crm.result.ResponseResult;
import com.crm.service.TransferService;
import com.crm.vo.TransferVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.Map;

@Service
public class TransferServiceImpl implements TransferService {
    @Autowired
    private TransferMapper transferMapper;
    @Autowired
    private ClueMapper clueMapper;

    @Override
    public PageResult pageQuery(TransferPageDTO transferPageDTO) {
        transferPageDTO.check();

        PageHelper.startPage(transferPageDTO.getPageNum(), transferPageDTO.getPageSize());
        Page<TransferVO> page = transferMapper.pageQuery(transferPageDTO);
        return new PageResult(page.getTotal(), page.getResult());
    }




}
